{# DEPRECATED #}
load_module modules/ngx_http_app_protect_module.so;

user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log debug;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    upstream backend_hosts {
        server {{ nginx_app_protect_demo_workload_host }};
    }

    server {
        listen       80;
        server_name  localhost;
        proxy_http_version 1.1;

        app_protect_enable on;
        app_protect_policy_file "{{ nginx_app_protect_security_policy_template.out_file_location }}{{ nginx_app_protect_security_policy_template.out_file_name }}";
        app_protect_security_log_enable on;
        app_protect_security_log "{{ nginx_app_protect_log_policy_template.out_file_location }}{{ nginx_app_protect_log_policy_template.out_file_name }}" {{ nginx_app_protect_log_policy_target }};

        location / {
            client_max_body_size 0;
            default_type text/html;
            proxy_pass {{ nginx_app_protect_demo_workload_protocol }}backend_hosts$request_uri;
        }
    }
}
